home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
oasis
/
oasisegs.lha
/
egs
/
lips.sml
< prev
next >
Wrap
Text File
|
1992-04-23
|
339b
|
12 lines
fun run 0 = 0
| run n = rev () andalso run (n-1)
fun rev () = reverse [1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
fun reverse [] = []
| reverse x::xs = append (reverse xs) [x]
fun append [] ys = ys
| append x::xs ys = x::append xs ys